Skip to content

Add async test cases for project deletion.#703

Merged
simondeziel merged 1 commit intocanonical:mainfrom
tugbataluy:add_async_project_deletion_test
Feb 24, 2026
Merged

Add async test cases for project deletion.#703
simondeziel merged 1 commit intocanonical:mainfrom
tugbataluy:add_async_project_deletion_test

Conversation

@tugbataluy
Copy link
Contributor

Summary

Following the recent LXD API change (lxd#17648) that made project deletion asynchronous, this PR adds unit tests to explicitly verify that pylxd handles both the wait=True and wait=False cases correctly for Project.delete().
No functional changes were required, the existing base class already handles async responses transparently. These tests document and protect that behaviour going forward.

… project deletion

Signed-off-by: tugbataluy <tugba.taluy@canonical.com>
@tugbataluy tugbataluy force-pushed the add_async_project_deletion_test branch from 81165b5 to c41a171 Compare February 24, 2026 16:15
@tugbataluy tugbataluy marked this pull request as ready for review February 24, 2026 16:22
@simondeziel simondeziel requested a review from Copilot February 24, 2026 16:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds unit tests for asynchronous project deletion following the LXD API change that made project deletion asynchronous. The tests verify that pylxd's existing base class properly handles both wait=True and wait=False cases for Project.delete().

Changes:

  • Added TestProjectAsync test class with async operation tests for project deletion
  • Added tests for delete(wait=True) and delete(wait=False) scenarios
  • Added mock helpers to simulate async delete responses

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@simondeziel simondeziel merged commit b47421b into canonical:main Feb 24, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants